#!/usr/bin/env node
const fs=require("fs"),
      fileName=process.argv[2] || __filename,
      log=console.log;

let fid=fs.openSync(fileName,'r'),//file open
    size=fs.statSync(fileName).size,//file  size
    buf=new Buffer(size);//file buffer

try{
fs.readSync(fid,buf,0,size,0);
log(buf.toString('utf8'));

  fs.closeSync(fid);
}catch(e){
  log(e.message);
  process.exit(1);
}



